// import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
// import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "OracleAlterTableModify.h"
#include "../../../../ast/statement/SQLColumnDefinition.h"
#include "../../visitor/OracleASTVisitor.h"
#include "../../../../../utils/listTran.h"

OracleAlterTableModify::OracleAlterTableModify()
{
  columns = std::make_shared<std::list<SQLColumnDefinition_ptr>>();
}

// @Override
void OracleAlterTableModify::accept0(OracleASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(OracleAlterTableModify)))
  {
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLColumnDefinition, SQLObject>(columns);
    acceptChild(visitor, tmp1);
  }
  visitor->endVisit(SharedObject(OracleAlterTableModify));
}

SQLColumnDefinition_list_ptr OracleAlterTableModify::getColumns()
{
  return columns;
}

void OracleAlterTableModify::addColumn(SQLColumnDefinition_ptr column)
{
  if (column != nullptr)
  {
    column->setParent(SharedObject(OracleAlterTableModify));
  }
  this->columns->push_back(column);
}
